<?php
$user = Users::model()->findByPk(Yii::app()->user->getId());
$empno = $user->employeeid;
?>
<div id="general">
    <h1>Jobs Center</h1>

    <div id="profileheader" style="clear: both; ">
        <table border="0" cellpadding="10" cellspacing="10">
            <tbody><tr>

                <td valign="top" style="padding-right: 25px;">



                    <div id="profile-header-balance" class="profile-header-item">
                        <br/>


                        <table width="250">
                            <tr>
                                <th colspan="2"> <h4>Job Status</h4></th>
                            </tr>
                            <?php foreach(JobsStatus::getJobStatusListAndCount($empno) as $status=>$count):?>
                            <tr>
                                <td><?php echo $status; ?></td>
                                <td style="text-align: right;"><?php echo $count; ?></td>

                            </tr>
                            <?php endforeach;?>
                            <tr><td>&nbsp;</td><td></td></tr>
                            <tr>
                                <td><b>Total Jobs</b></td>
                                <td style="text-align: right;"><?php echo Jobs::getTotalJobs($empno); ?></td>
                            </tr>
                        </table>



                    </div>


                </td>
                <td valign="top">

                    <div id="profile-header-balance" class="profile-header-item">
                        <br/>

                        <table width="250">
                            <tr>
                                <th colspan="2"> <h4>Job Billing Status</h4></th>
                            </tr>
                            <?php foreach(JobsBillingStatus::getStatusListAndCount($empno) as $status=>$count):?>
                            <tr>
                                <td>&nbsp;<?php echo $status; ?></td>
                                <td style="text-align: right;"><?php echo $count; ?></td>

                            </tr>
                            <?php endforeach;?>

                        </table>
                </td>
            </tr>
            </tbody></table>
    </div>
</div>
